<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="Generator" content="Trainercity v1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="<?php echo $this->_var['keywords']; ?>" />
<meta name="Description" content="<?php echo $this->_var['description']; ?>" />
<title><?php echo $this->_var['page_title']; ?></title>
<link href="<?php echo $this->_var['ecs_css_path']; ?>" rel="stylesheet" type="text/css" />

<?php echo $this->smarty_insert_scripts(array('files'=>'common.js,user.js')); ?>
<script type="text/javascript">


  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-1848127-18']);
  _gaq.push(['_setDomainName', '.fitwow.com']);
  _gaq.push(['_trackPageview']);


  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();


</script></head>
<body>
<?php echo $this->fetch('library/page_header.lbi'); ?>
	<form action="projects.php" method="post">
    	<div class="l_con">
   			<div class="l_con_left">
   	   		<p class="h2Title">Find Clients' listings</p>  		
			<ul class="l_ul_con">
            	<li style="height:30px; ">
                <input name="keywords" type="text" style="width:312px; color:#FF0000;" />
				</li>
                <li class="h2Title">				in
				<input id="my_address" name="my_address" type="text" style="width:226px; color:#FF0000;" onkeyup="showHint(this.value)" />
				<div id="txtHint" style="position:absolute;top:225px;left:135px;width:201px;height:10px;z-index:2;">				
				</div>
				<input name="" type="submit" class="l_bom03 font04"  value="Search" style="vertical-align:middle;"/>
				</li>
       	    </ul>
			
			
                <div class="lcl_left_top"></div>
                	<div class="lcl_left_center">
                    	<div class="sideBarCube">
                        	<h2><img src="themes/default/images/l_07.gif" width="21" height="16"><span class="h2Title">Trainer type</span></h2>
							<ul>
                            	<?php if ($this->_var['trainer_type'] == 0): ?>
								<a href="projects.php?act=search&trainertype=0" class="font08 selectBGA">
                                <li class="selectBG">
								All
								</li>
								</a>
								<?php else: ?>
								<a href="projects.php?act=search&trainertype=0" class="font08">
								<li>
								All
								</li>
								</a>
								<?php endif; ?>
								
								<?php $_from = $this->_var['trainertype']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'value');if (count($_from)):
    foreach ($_from AS $this->_var['value']):
?>
								<?php if ($this->_var['value']['num'] == $this->_var['trainer_type']): ?>
								<a href="projects.php?act=search&trainertype=<?php echo $this->_var['value']['num']; ?>" class="font08 selectBGA" >
								<li class="selectBG">							
								<?php echo $this->_var['value']['trainerType']; ?>
								</li>
								</a>
								<?php else: ?>
								<a href="projects.php?act=search&trainertype=<?php echo $this->_var['value']['num']; ?>" class="font08" >
								<li>
								<?php echo $this->_var['value']['trainerType']; ?> 								
								</li>
								</a>
								<?php endif; ?>
								<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                            </ul>
                        </div>
                        <div class="sideBarCube">
                        	<h2><img src="themes/default/images/l_09.gif" width="21" height="16"><span class="h2Title">Training type</span></h2>
                            <ul>
								<?php if ($this->_var['training_type'] == 0): ?>
								<a href="projects.php?act=search&trainingtype=0" class="font08 selectBGA">
                                <li class="selectBG">
								All
								</li>
								</a>
								<?php else: ?>
								<a href="projects.php?act=search&trainingtype=0" class="font08">
								<li >
								All
								</li>
								</a>
								<?php endif; ?>
								
								<?php $_from = $this->_var['trainingtype']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'value');if (count($_from)):
    foreach ($_from AS $this->_var['value']):
?>
								<?php if ($this->_var['value']['num'] == $this->_var['training_type']): ?>
								<a href="projects.php?act=search&trainingtype=<?php echo $this->_var['value']['num']; ?>" class="font08 selectBGA" >
								<li class="selectBG">							
								<?php echo $this->_var['value']['trainingType']; ?> 
								</li>
								</a>
								<?php else: ?>
								<a href="projects.php?act=search&trainingtype=<?php echo $this->_var['value']['num']; ?>" class="font08" >
								<li>
								<?php echo $this->_var['value']['trainingType']; ?>
								</li>
								</a>
								<?php endif; ?>
								<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                            </ul>
                        </div>
                        <div class="sideBarCube">
                        	<h2><img src="themes/default/images/l_12.gif" width="21" height="16"><span class="h2Title">Training budgets</span></h2>
                            <ul>
                                <?php if ($this->_var['budget_type'] == 0): ?>
								<a href="projects.php?act=search&budget=0" class="font08 selectBGA">
                                <li class="selectBG">
								All
								</li>
								</a>
								<?php else: ?>
								<a href="projects.php?act=search&budget=0" class="font08">
								<li >
								All
								</li>
								</a>
								<?php endif; ?>
								 
                                <?php $_from = $this->_var['budget']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'value');if (count($_from)):
    foreach ($_from AS $this->_var['value']):
?>
							    <?php if ($this->_var['value']['num'] == $this->_var['budget_type']): ?>
								<a href="projects.php?act=search&budget=<?php echo $this->_var['value']['num']; ?>" class="font08 selectBGA" >
								<li class="selectBG">							
								<?php echo $this->_var['value']['budgetType']; ?> 
								</li>
								</a>
								<?php else: ?>
								<a href="projects.php?act=search&budget=<?php echo $this->_var['value']['num']; ?>" class="font08">
							    <li>
							    <?php echo $this->_var['value']['budgetType']; ?>
							    </li>
								</a>
							    <?php endif; ?>
							   <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>                             
                            </ul>
                        </div>
                        <!--<div class="lcl_lin"><img src="themes/default/images/l_13.gif" width="317" height="2"></div>-->
                		<div class="sideBarCube">
                        	<h2><img src="themes/default/images/l_15.gif" width="21" height="16"><span class="h2Title">Quote status</span></h2>
                            <ul>
								<?php if ($this->_var['quoting_type'] == 0): ?>
								<a href="projects.php?act=search&close_open=0" class="font08 selectBGA">
                                <li class="selectBG">
								All
								</li>
								</a>

								<a href="projects.php?act=search&close_open=1" class="font08">
                                <li >
								Open
								</li>
								</a>
								<a href="projects.php?act=search&close_open=2" class="font08">
                                <li>
								Closed
								</li>
								</a>								
								<?php elseif ($this->_var['quoting_type'] == 1): ?>
								<a href="projects.php?act=search&close_open=0" class="font08">
                                <li>
								All
								</li>
								</a>
								
								<a href="projects.php?act=search&close_open=1" class="font08 selectBGA">
                                <li class="selectBG">
								Open
								</li>
								</a>
								<a href="projects.php?act=search&close_open=2" class="font08">
                                <li>
								Closed
								</li>
								</a>
								<?php else: ?>
								<a href="projects.php?act=search&close_open=0" class="font08">
                                <li>
								All
								</li>
								</a>

								<a href="projects.php?act=search&close_open=1" class="font08">
								<li >
								Open
								</li>
								</a>
								<a href="projects.php?act=search&close_open=2" class="font08 selectBGA">
                                <li class="selectBG">
								Closed
								</li>
								</a>
								<?php endif; ?>
                            </ul>
                        </div>
                    </div>
                    <div class="lcl_left_bottom"></div>
           		</div>
			
		   		<br />
		   		<br />
            	<div class="l_con_right">
				<?php if ($this->_var['featurecount'] != 0): ?>
            	<p class="l_con_rightp font071">Today's featured project</p>
				<?php $_from = $this->_var['featurelist']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'value');if (count($_from)):
    foreach ($_from AS $this->_var['value']):
?>
                <div class="l_con_right01">
               		<div class="l_con_right01_left">
               	    <dl>
                    	<dt><img src="themes/default/images/105.gif" width="65" height="65"></dt>
                        <dd class="font071"><a href="projects.php?act=view_project&pid=<?php echo $this->_var['value']['pid']; ?>"><?php echo $this->_var['value']['subject']; ?></a></dd>
                    </dl>
                    <p class="font11"><?php echo $this->_var['value']['city']; ?>, California 94305<br />
                     Submitted: <?php echo $this->_var['value']['createdDate']; ?> </p>
                    </div>
                    <div class="l_con_right01_right">
                    	<p class="font12 l_p1">Prize<?php echo $this->_var['value']['budgetType']; ?></p>
                        <p class="font05 l_p1">Bid ends    <?php echo $this->_var['value']['lefttime']; ?>
<br />Proposals  4</p>
                        <p><input name="" type="button"  class="font061" value="Apply to become my trainer" style="height:29px; line-height:29px; background:url(themes/default/images/l_16.gif) no-repeat; border:none; width:256px; text-align:center;" /></p>
                    </div>
                </div> 
				<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
				<?php endif; ?>
				
                <div class="paddingBot5">
                    <div class="floatRight">&nbsp;Sort by&nbsp;
					<select id="sort_type" name="sort_type" style=" padding:5px 2px;">
					<option value="subject" >Listing name</option> 
					<option value="pid" >Launch Date</option> 										
					<option value="proposalsNum" ># of offers</option> 
					<option value="budget" >Prize</option> 
					</select>					
					<input name="" type="submit" class="l_bom03 font04"  value="Sort"/>
					<input type="hidden" name="act" value="search" />
            	</div><div class="h2Title16 specialColor paddingTop5"><?php echo $this->_var['taskcount']; ?> Clients' listings found
                    
                </div>
                <div class="clear"></div>
                </div>
                
                <div class="lcl_hui font06" style="background: #EBEBEB">
                	<div class="lcl_hui01 font11" style="width:381px; text-align:left; padding-left:7px;">Listing name</div>
                    <div class="lcl_hui02 font11">Bid ends</div>
                    <div class="lcl_hui03 font063 font11">Offers</div>
                    <div class="lcl_hui04 font11">Prize</div>
                </div>              
				<?php $_from = $this->_var['tasklist']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'value');if (count($_from)):
    foreach ($_from AS $this->_var['value']):
?>
				<div class="lcl_huicon" style="padding:15px 0px;">
                	<div class="lcl_hui01" style="text-align:left; width:388px;">
                    	<dl>
							<a href="user.php?user_id=<?php echo $this->_var['value']['user_id']; ?>" class="font11">
                        	<dt>
							<?php if ($this->_var['value']['photo']): ?>
							<img src="<?php echo $this->_var['value']['photo']; ?>" width="65px;" />
							<?php elseif ($this->_var['value']['sex'] == 0): ?>
							<img src="themes/default/images/girls.gif" width="65px;"/>
							<?php else: ?>
							<img src="themes/default/images/boys.gif" width="65px;"/>
							<?php endif; ?>
							</dt>
                            <dd><?php echo $this->_var['value']['firstname']; ?>&nbsp;<?php echo $this->_var['value']['lastname']['0']; ?></dd>
							</a>
                        </dl>
                        <div class="lcl_right" style="text-align:left;">
                        	<p class="font16B lcl_project"><a href="projects.php?act=view_project&pid=<?php echo $this->_var['value']['pid']; ?>"><span style="float:left; display:block;"><?php echo $this->_var['value']['subject']; ?> </span></a><span style=" float:right; margin-top:8px;"><?php if ($this->_var['value'] [ 'featuredFlag' ] == 1): ?><img src="themes/default/images/l_18.gif"><?php endif; ?>														
							</span>							
							</p>
							<p class="font11N fontColorDan">
							<?php echo $this->_var['value']['trainingType']; ?>
							</p>
                        	<p class="font11 lcl_palo" ><?php echo $this->_var['value']['city']; ?><br />
                     Submitted: <?php echo $this->_var['value']['createdDate']; ?> </p>
                        </div>
                    </div>
                  	<div class="lcl_hui02 lcl_min font11" style="line-height:14px; padding-top:10px;">
					<?php if ($this->_var['value']['status'] == 5): ?>
					Closed
					<?php else: ?>
					<?php echo $this->_var['value']['lefttime']; ?>
					<?php endif; ?>
					</div>
                  	<div class="lcl_hui03 lcl_min font11"><?php echo $this->_var['value']['proposalsNum']; ?></div>
                  	<div class="lcl_hui04 lcl_min font11"><?php echo $this->_var['value']['budgetType']; ?></div>
                </div>
				<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?> 
				</form>               
            </div> 
			<?php echo $this->fetch('library/pages.lbi'); ?>         
       </div>
	   
       <div class="lcl_llin"></div>
       <?php echo $this->fetch('library/page_footer.lbi'); ?>   	
</body>
<script language="JavaScript">
var xmlHttp

function showHint(str)
{
	
if (str.length==0)
  { 
  document.getElementById("txtHint").innerHTML=""
  return
  }
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  {
  alert ("Browser does not support HTTP Request")
  return
  } 
var url="projects.php"
url=url+"?act=act_get_city&q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 

function get_city_string(obj) 
{

  document.getElementById("my_address").value = obj.innerHTML;
  document.getElementById("txtHint").style.display = 'none';
}

function change_color(obj) 
{
	
  obj.style.background= "#00CCFF";
}

function back_color(obj) 
{
	
  obj.style.background= "#F2F2F2";
}

function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("txtHint").style.display = 'block'
 document.getElementById("txtHint").innerHTML=xmlHttp.responseText 
 } 
}


function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 // Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}


function registertab()
{
  var tabContent1 = document.getElementById('register'),
  tabContent2 = document.getElementById('login');
  
  tabContent1.style.display="block";
  tabContent2.style.display="none";
}

function logintab()
{
  var tabContent1 = document.getElementById('register'),
  tabContent2 = document.getElementById('login');
  
  tabContent1.style.display="none";
  tabContent2.style.display="block";
}

function choose()
{	
	var value = '';
	
	var form1 = document.getElementsByName('trainertype');
    var i = 0;
	var temp;
	var nextListItem;
    for (i=1; i<form1.length; i++)
    {
        if (form1[i].checked)
        {
			nextListItem = form1[i].nextSibling;					
            temp = "trainer type:" + nextListItem.nodeValue + "; ";	
			value = value + temp;					
            break;
        }
    }
	
	var form1 = document.getElementsByName('trainingtype');
    var i = 0;
	var temp;
	var nextListItem;
    for (i=1; i<form1.length; i++)
    {
        if (form1[i].checked)
        {
			nextListItem = form1[i].nextSibling;					
            temp = "training type:" + nextListItem.nodeValue + "; ";	
			value = value + temp;					
            break;
        }
    }
	
	var form1 = document.getElementsByName('budget');
    var i = 0;
	var temp;
	var nextListItem;
    for (i=1; i<form1.length; i++)
    {
        if (form1[i].checked)
        {
			nextListItem = form1[i].nextSibling;					
            temp = "budget:" + nextListItem.nodeValue + "; ";	
			value = value + temp;					
            break;
        }
    }
	
	var form1 = document.getElementsByName('close_open');
    var i = 0;
	var temp;
	var nextListItem;
    for (i=0; i<form1.length; i++)
    {
        if (form1[i].checked)
        {
			nextListItem = form1[i].nextSibling;					
            temp = "close or open:" + nextListItem.nodeValue + "; ";	
			value = value + temp;					
            break;
        }
    }
	   		 		
	document.getElementById('search_condition').value = value;
}


</script>
</html>
